import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '../views/Home.vue';
import Loading from '../views/Loading.vue';
import Coffee from '../views/Coffee.vue';
import Fireworks from '../views/Fireworks.vue';
import pageContent from '../views/pageContent.vue';
import WenWen from '../views/WenWen.vue';

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    name: 'Loading',
    component: Loading,
  },
  {
    path: '/home',
    name: 'home',
    component: Home,
    children: [
      {
        path: '/',
        redirect: '/pageContent',
      },
      {
        path: '/pageContent',
        name: 'pageContent',
        component: pageContent,
      },
      {
        path: '/coffee',
        name: 'coffee',
        component: Coffee,
      },
      {
        path: '/fireworks',
        name: 'fireworks',
        component: Fireworks,
      },
      {
        path: '/WenWen',
        name: 'WenWen',
        component: WenWen,
      },
    ],
  },
];

const router = new VueRouter({
  mode: 'hash',
  // base: process.env.BASE_URL,
  routes,
});

export default router;
